import request from "@/utils/request.js"


///////////////////机票管理/////////////////////////////
export const selectAllAircraft=(origin,destination,pageNum,pageSize)=>
    request.get(`wzz/selectAllAircraft?originName=${origin}&destinationName=${destination}&pageNum=${pageNum}&pageSize=${pageSize}`)
//条件+分页查询机票信息

export const deleteAircraft=(id)=>
    request.get(`wzz/deleteAircraft?id=${id}`)//删除机票信息

export const addAircraft=(data)=>
    request.post(`wzz/addAircraft`,data)//添加机票信息

export const updateAircraft=(data)=>
    request.post(`wzz/updateAircraft`,data)//修改机票信息

export const selectById=(id)=>
    request.get(`wzz/selectById?id=${id}`)//根据id查看机票信息


//////////////////////////热门管理/////////////////////////////////////////

export const selectAllAttractions=(name,pageNum,pageSize)=>
    request.get(`attractions/selectAllAttractions?name=${name}&pageNum=${pageNum}&pageSize=${pageSize}`)
//条件+分页查询景点推荐

export const updateAttractions=(data)=>
    request.post('attractions/updateAttractions',data)//修改景点推荐

export const updatePub=(data)=>
    request.post('pub/updatePub',data)//修改酒店推荐

export const selectAllPub=(name,pageNum,pageSize)=>
    request.get(`pub/selectAllPub?name=${name}&pageNum=${pageNum}&pageSize=${pageSize}`)
//条件+分页查询酒店推荐

export const updateAttractions2=(data)=>
    request.post('attractions/updateAttractions2',data)//取消景点推荐

export const updatePub2=(data)=>
    request.post('pub/updatePub2',data)//取消酒店推荐



//////////////////////////船票管理/////////////////////////////////////

export const selectAllBoat=(origin,destination,pageNum,pageSize)=>
    request.get(`boat/selectAllBoat?beginningName=${origin}&destinationName=${destination}&pageNum=${pageNum}&pageSize=${pageSize}`)
//条件+分页查询船票信息

export const addBoat=(data)=>
    request.post(`boat/addBoat`,data)//添加船票信息

export const updateBoat=(data)=>
    request.post(`boat/updateBoat`,data)//修改船票信息

export const selectByIdBoat=(id)=>
    request.get(`boat/selectByIdBoat?id=${id}`)//根据id查看船票信息

export const deleteBoat=(id)=> request.get(`boat/deleteBoat?id=${id}`)//删除船票信息


////////////////////////////////酒店管理////////////////////////////////////

export const deletePubManage=(id)=>
    request.get(`pubManage/deletePubManage?id=${id}`)//删除酒店管理信息

export const selectAllPubManage=(name,pageNum,pageSize)=>
    request.get(`pubManage/selectAllPubManage?name=${name}&pageNum=${pageNum}&pageSize=${pageSize}`)
//条件+分页查询酒店管理

export const addPubManage=(data)=>
    request.post(`pubManage/addPubManage`,data)//添加酒店管理信息

export const updatePubManage=(data)=>
    request.post(`pubManage/updatePubManage`,data)//修改酒店管理信息

export const selectPubManageById=(id)=>
    request.get(`pubManage/selectPubManageById?id=${id}`)//根据id查看酒店管理信息

//////////////////城市显示///////////////////////

export const selectProvince=(cid) =>
    request.get(`area/selectProvince?cid=${cid}`)//根据id查看地域信息


///////////////////////订单管理/////////////////////////////


export const selectOrderList=(classification,pageNum,pageSize) =>
    request.get(`order/selectOrderList?classification=${classification}&pageNum=${pageNum}&pageSize=${pageSize}`)//分页查询订单信息

export const selectOrderById=(id) =>
    request.get(`order/selectOrderById?id=${id}`)//根据id查看订单信息


///////////////////////用户管理/////////////////////////////


export const selectAllUser=(realName,pageNum,pageSize) =>
    request.get(`user/selectAllUser?realName=${realName}&pageNum=${pageNum}&pageSize=${pageSize}`)//分页查询订单信息


export const selectUserById=(id) =>
    request.get(`user/selectUserById?id=${id}`)//根据id查看用户信息


export const updateUser1=(data)=>
    request.post(`user/updateUser1`,data)//解冻用户信息

export const updateUser2=(data)=>
    request.post(`user/updateUser2`,data)//冻结用户信息



//////////////////////////管理员管理/////////////////////////////////

export const login=(data)=>
    request.post(`manage/login`,data)//登录

export const selectAllManage=(manager,pageNum,pageSize) =>
    request.get(`manage/selectAllManage?manager=${manager}&pageNum=${pageNum}&pageSize=${pageSize}`)//条件+分页查询管理员信息

export const selectManageById=(id) =>
    request.get(`manage/selectManageById?id=${id}`)//根据id查看管理员信息

export const deleteManage=(id) =>
    request.get(`manage/deleteManage?id=${id}`)//删除管理员信息

export const addManage=(data) =>
    request.post(`manage/addManage`,data)//添加管理员信息

export const updateManage=(data) =>
    request.post(`manage/updateManage`,data)//根据id查看用户信息

/////////////////////////////浏览量//////////////////////////////////////

export const count1=() =>
    request.get(`history/count1`)//酒店浏览量

export const count2=() =>
    request.get(`history/count2`)//景点浏览量

/////////////////////////////收藏量//////////////////////////////////////

export const count3=() =>
    request.get(`collection/count3`)//酒店浏览量

export const count4=() =>
    request.get(`collection/count4`)//景点浏览量





